package cn.maihe.elg.operation.utils;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SimplePropertyPreFilter;

import java.util.Arrays;

/**
 * @Description 日志打印时，可以配置属性排除，配置属性排除后，该字段不会打印出来
 * @Author SSX
 * @Date 2025/05/11
 */
public class LogPrintUtil {
    public static String toJsonString(Object body) {
        SimplePropertyPreFilter filter = new SimplePropertyPreFilter();
        filter.getExcludes().addAll(Arrays.asList("baohanfile","file"));
        return JSON.toJSONString(body, filter);
    }
}
